webpackJsonp([30],{

/***/ "IKsU":
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ "Jmz+":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("lC5x");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("J0Oq");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./src/common/api/commonApi.js
var commonApi = __webpack_require__("+/+p");

// EXTERNAL MODULE: ./src/common/utils/index.js
var utils = __webpack_require__("dh3M");

// EXTERNAL MODULE: ./node_modules/_lodash@4.17.11@lodash/lodash.js
var lodash = __webpack_require__("psq8");
var lodash_default = /*#__PURE__*/__webpack_require__.n(lodash);

// CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/common/anjian/contact/index.vue


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//





var CATEGORY = [{
  D_code: '1',
  D_text: '应急指挥部'
}, {
  D_code: '2',
  D_text: '应急队伍'
}, {
  D_code: '3',
  D_text: '应急专家'
}, {
  D_code: '4',
  D_text: '医疗机构'
}, {
  D_code: '5',
  D_text: '安管人员'
}, {
  D_code: '6',
  D_text: '特殊作业人员'
}, {
  D_code: '7',
  D_text: '重大危险源负责人'
}, {
  D_code: '8',
  D_text: '企业主要负责人'
}, {
  D_code: '9',
  D_text: '企业安全负责人'
}, {
  D_code: '10',
  D_text: '企业安全管理人员'
}, {
  D_code: '11',
  D_text: '视频管理人员'
}, {
  D_code: '12',
  D_text: '设备管理人员'
}];
/* harmony default export */ var contact = ({
  data: function data() {
    var _this = this;

    return {
      input: false,
      inputValue: '',
      rightData: [{
        font: 'yt-icon yt-icon-search',
        click: function click() {
          _this.search = !_this.search;
        }
      }],
      firstData: true,
      active: [],
      items: [],
      categoryDic: CATEGORY,
      categoryDicSelected: CATEGORY[0].D_code,
      search: false,
      searchApi: function () {
        var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(_ref2) {
          var skip = _ref2.skip,
              limit = _ref2.limit;
          var curCategory, items, safetyMaDic, workTypeDic;
          return regenerator_default.a.wrap(function _callee$(_context) {
            while (1) {
              switch (_context.prev = _context.next) {
                case 0:
                  curCategory = CATEGORY.filter(function (v) {
                    return v.D_code === _this.categoryDicSelected;
                  });
                  items = [];
                  _context.t0 = curCategory[0].D_text;
                  _context.next = _context.t0 === '应急指挥部' ? 5 : _context.t0 === '应急队伍' ? 9 : _context.t0 === '应急专家' ? 13 : _context.t0 === '医疗机构' ? 17 : _context.t0 === '安管人员' ? 21 : _context.t0 === '特殊作业人员' ? 29 : _context.t0 === '重大危险源负责人' ? 37 : _context.t0 === '企业主要负责人' ? 41 : _context.t0 === '企业安全负责人' ? 45 : _context.t0 === '企业安全管理人员' ? 49 : _context.t0 === '视频管理人员' ? 53 : _context.t0 === '设备管理人员' ? 57 : 61;
                  break;

                case 5:
                  _context.next = 7;
                  return commonApi["a" /* commonApi */].search('yj_mail_list_zh', { skip: skip, limit: limit });

                case 7:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.name,
                      post: v.post,
                      mobile: v.mobile
                    };
                  }));

                case 9:
                  _context.next = 11;
                  return commonApi["a" /* commonApi */].search('yj_mail_list_dw', { skip: skip, limit: limit });

                case 11:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.department_people,
                      post: v.ranks_name,
                      mobile: v.department_mobile
                    };
                  }));

                case 13:
                  _context.next = 15;
                  return commonApi["a" /* commonApi */].search('yj_mail_list_zj', { skip: skip, limit: limit });

                case 15:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.name,
                      post: v.major,
                      mobile: v.peopleLX
                    };
                  }));

                case 17:
                  _context.next = 19;
                  return commonApi["a" /* commonApi */].search('yj_mail_list_yl', { skip: skip, limit: limit });

                case 19:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.name,
                      post: '',
                      mobile: v.mobile
                    };
                  }));

                case 21:
                  _context.next = 23;
                  return commonApi["a" /* commonApi */].dictionary('safety_ma');

                case 23:
                  safetyMaDic = _context.sent;
                  _context.next = 26;
                  return commonApi["a" /* commonApi */].search('spe_safety_admins', { skip: skip, limit: limit });

                case 26:
                  items = _context.sent;

                  items = items.map(function (v) {
                    return {
                      name: v.name,
                      post: v.safety_manager_category,
                      mobile: v.tel
                    };
                  });
                  return _context.abrupt('return', Object(utils["d" /* ReplaceDictionary */])(items, { post: safetyMaDic }));

                case 29:
                  _context.next = 31;
                  return commonApi["a" /* commonApi */].dictionary('work_type');

                case 31:
                  workTypeDic = _context.sent;
                  _context.next = 34;
                  return commonApi["a" /* commonApi */].search('spe_special_worker');

                case 34:
                  items = _context.sent;

                  items = items.map(function (v) {
                    return {
                      name: v.name,
                      post: v.job_title,
                      mobile: v.tel
                    };
                  });
                  return _context.abrupt('return', Object(utils["d" /* ReplaceDictionary */])(items, { post: workTypeDic }));

                case 37:
                  _context.next = 39;
                  return commonApi["a" /* commonApi */].search('security_risk_filing');

                case 39:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.responsible,
                      post: v.responsibleDepart,
                      mobile: v.responsibleMobile
                    };
                  }));

                case 41:
                  _context.next = 43;
                  return commonApi["a" /* commonApi */].search('ent_enterprise_PersonnelInfo', {
                    equalTo: { PersonnelClassification: '主要负责人' }
                  });

                case 43:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.UserName,
                      post: v.UserDuties,
                      mobile: v.ContactNumber
                    };
                  }));

                case 45:
                  _context.next = 47;
                  return commonApi["a" /* commonApi */].search('ent_enterprise_PersonnelInfo', {
                    equalTo: { PersonnelClassification: '安全负责人' }
                  });

                case 47:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.UserName,
                      post: v.UserDuties,
                      mobile: v.ContactNumber
                    };
                  }));

                case 49:
                  _context.next = 51;
                  return commonApi["a" /* commonApi */].search('ent_enterprise_PersonnelInfo', {
                    equalTo: { PersonnelClassification: '安全管理人员' }
                  });

                case 51:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.UserName,
                      post: v.UserDuties,
                      mobile: v.ContactNumber
                    };
                  }));

                case 53:
                  _context.next = 55;
                  return commonApi["a" /* commonApi */].search('measure_video', {
                    notEqualTo: { AdminPersonnel: '' },
                    exists: ['AdminPersonnel']
                  });

                case 55:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.AdminPersonnel,
                      post: v.AdminDepartment,
                      mobile: v.AdminPersonnelMobile
                    };
                  }));

                case 57:
                  _context.next = 59;
                  return commonApi["a" /* commonApi */].search('measure_automation', {
                    notEqualTo: { AdminPersonnel: '' },
                    exists: ['AdminPersonnel']
                  });

                case 59:
                  items = _context.sent;
                  return _context.abrupt('return', items.map(function (v) {
                    return {
                      name: v.AdminPersonnel,
                      post: v.AdminDepartment,
                      mobile: v.AdminPersonnelMobile
                    };
                  }));

                case 61:
                  return _context.abrupt('return', []);

                case 62:
                case 'end':
                  return _context.stop();
              }
            }
          }, _callee, _this);
        }));

        return function searchApi(_x) {
          return _ref.apply(this, arguments);
        };
      }()
    };
  },

  methods: {
    onSearch: function onSearch() {
      this.search = false;
      this.$refs.group.startPull();
    }
  }
});
// CONCATENATED MODULE: ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{"id":"data-v-7f1f15c4","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/common/anjian/contact/index.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('yt-page',{attrs:{"title":"通讯联络","rightData":_vm.rightData}},[_c('yt-group',{ref:"group",attrs:{"searchApi":_vm.searchApi,"group":false},scopedSlots:_vm._u([{key:"default",fn:function(user){return _c('yt-cell',{attrs:{"labelWidth":"65%"}},[_c('div',{staticClass:"flex",attrs:{"slot":"label"},slot:"label"},[_c('span',{staticStyle:{"min-width":"50px"}},[_vm._v(_vm._s(user.name))]),_vm._v(" "),_c('span',{directives:[{name:"show",rawName:"v-show",value:(user.post),expression:"user.post"}],staticClass:"badge bg-gray"},[_vm._v(_vm._s(user.post))])]),_vm._v(" "),_c('yt-cell-call',{attrs:{"tel":user.mobile || ''}})],1)}}])}),_vm._v(" "),_c('yt-popup',{attrs:{"slot":"alert","pos":"right","mask":true},slot:"alert",model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:"search"}},[_c('yt-page',{staticClass:"page",attrs:{"flex":true,"leftData":[],"title":"人员类别"}},[_c('yt-form',[_c('yt-inlineSelect',{attrs:{"list":_vm.categoryDic,"label":"D_text","val":"D_code","x":2},model:{value:(_vm.categoryDicSelected),callback:function ($$v) {_vm.categoryDicSelected=$$v},expression:"categoryDicSelected"}}),_vm._v(" "),_c('yt-btn-group',{attrs:{"slot":"btn","shadow":false},slot:"btn"},[_c('yt-btn',{attrs:{"theme":"white"},on:{"click":function($event){_vm.search = false}}},[_vm._v("关闭")]),_vm._v(" "),_c('yt-btn',{on:{"click":_vm.onSearch}},[_vm._v("确定")])],1)],1)],1)],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var anjian_contact = (esExports);
// CONCATENATED MODULE: ./src/common/anjian/contact/index.vue
function injectStyle (ssrContext) {
  __webpack_require__("IKsU")
}
var normalizeComponent = __webpack_require__("C7Lr")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-7f1f15c4"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  contact,
  anjian_contact,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var common_anjian_contact = __webpack_exports__["default"] = (Component.exports);


/***/ })

});